package com.example.baiduai.ai.vo.Results;

import lombok.Data;

import java.math.BigDecimal;


public class AiImagesObjectDetectionResult {

    private String name;

    private BigDecimal score ;

    private Location location;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Location getLocation() {
        return location;
    }

    public void setLocation(Location location) {
        this.location = location;
    }

    public BigDecimal getScore() {
        return score.setScale(2, BigDecimal.ROUND_DOWN);
    }

    public void setScore(BigDecimal score) {
        this.score = score;
    }

    public AiImagesObjectDetectionResult(String name, BigDecimal score, Location location) {
        this.name = name;
        this.score = score;
        this.location = location;
    }
}


@Data
 class Location {

    Long left;

    Long top;

    Long width;

    Long height;
}
